<?php
set_time_limit(0);
if (isset($_POST['uid']) && isset($_POST['num'])){
    include '../c/config.php';

    $num=addslashes(trim($_POST['num']));
    $nianji=addslashes(trim($_POST['nianji']));
    $city=addslashes(trim($_POST['city']));
     
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    if (!$mysqli->set_charset("utf8")) {printf("Error loading character set utf8: %s\n", $mysqli->error);}
    
   $table='';
   if (6 == $nianji) {
     $table='s6';
   }
   if (7 == $nianji) {
     $table='s7';
   }
   if (8 == $nianji) {
     $table='s8';
   }
   if (9 == $nianji) {
     $table='s9';
   }
     
      
 
    $queryJ=$mysqli->query("SELECT name,phone,qu,school from `".$table."` where id='".$num."'  limit 0,1 ");
    if($queryJ->num_rows>0){
       $getU=$queryJ->fetch_assoc();
       $mysqli->close();
       if (isset($getU['name']) && !empty($getU['name']) ) {
           echo json_encode(array('s'=>'y','n'=>$getU['name'],'p'=>$getU['phone'],'q'=>$getU['qu'],'x'=>$getU['school']));
       }else{
        echo json_encode(array('s'=>'n'));
        exit;
       }
    
      
    }else{
    
       echo json_encode(array('s'=>'n'));
    }
    
}else{
    echo json_encode(array('s'=>'n'));
}

?>